<extend name="./Common/View/Public/list.html" />

<block name="page_title">线下分数列表</block>
<block name="search">
    <div class="layui-input-inline">
        <select name="project_id" id="project_id" lay-filter="project_id" api="rate/project/slist" affect="#norm_id" empty="项目"></select>
    </div>
    <div class="layui-input-inline">
        <select name="norm_id" id="norm_id" lay-filter="norm_id" api="rate/norm/slist/way/2" depend="#project_id" empty="指标"></select>
    </div>
</block>

<block name="toolbar">
    {:W('Todo/UI/toolbar',array('线下分数',array('delete','imports', 'exports')))}
</block>

<block name="main">
    <script type="text/javascript">
        var list = {api:"{$Think.const.MODULE_NAME}/{$Think.const.CONTROLLER_NAME}/"};
        list.columns =  [[
            {checkbox: true, fixed: true}
            , {field:'project_id', minWidth:100, title : '项目名称', sort: true, templet: '#tpl_project'}
            , {field:'norm_id', minWidth:150, title : '指标名称', sort: true, templet: '#tpl_norm'}
            , {field:'name', minWidth:150, title : '用户姓名'}
            , {field:'score', minWidth:100, title : '分数'}
            ,{fixed: 'right', minWidth:160, align:'center', toolbar: '#tpl_bar'}
        ]];
    </script>
    <script type="text/html" id="tpl_bar">
        {{ format_optbar(['edit','delete']) }}
    </script>
    <script type="text/html" id="tpl_project">
        {{ format_data_project(d.project_id) }}
    </script>
    <script type="text/html" id="tpl_norm">
        {{ format_data_norm(d.norm_id) }}
    </script>
</block>
<block name="script">
    <script src="/api/Rate/Project/format"></script>
    <script src="/api/Rate/Norm/format"></script>
</block>